package com.cpi.webservice.proxy.sapinterface;

public class SapInterfaceRemoteProxy implements com.cpi.webservice.proxy.sapinterface.SapInterfaceRemote {
	private String SapInterfaceBeanWS_address = null;
  private String _endpoint = null;
  private com.cpi.webservice.proxy.sapinterface.SapInterfaceRemote sapInterfaceRemote = null;
  
  public SapInterfaceRemoteProxy(String nSapInterfaceBeanWS_address) {
	  SapInterfaceBeanWS_address = nSapInterfaceBeanWS_address;
    _initSapInterfaceRemoteProxy();
  }
  
  private void _initSapInterfaceRemoteProxy() {
    try {
      sapInterfaceRemote = (new com.cpi.webservice.proxy.sapinterface.SapInterfaceRemoteServiceLocator(SapInterfaceBeanWS_address)).getSapInterfaceBeanWS();
      if (sapInterfaceRemote != null) {
        if (_endpoint != null)
          ((javax.xml.rpc.Stub)sapInterfaceRemote)._setProperty("javax.xml.rpc.service.endpoint.address", _endpoint);
        else
          _endpoint = (String)((javax.xml.rpc.Stub)sapInterfaceRemote)._getProperty("javax.xml.rpc.service.endpoint.address");
      }
      
    }
    catch (javax.xml.rpc.ServiceException serviceException) {}
  }
  
  public String getEndpoint() {
    return _endpoint;
  }
  
  public void setEndpoint(String endpoint) {
    _endpoint = endpoint;
    if (sapInterfaceRemote != null)
      ((javax.xml.rpc.Stub)sapInterfaceRemote)._setProperty("javax.xml.rpc.service.endpoint.address", _endpoint);
    
  }
  
  public com.cpi.webservice.proxy.sapinterface.SapInterfaceRemote getSapInterfaceRemote() {
    if (sapInterfaceRemote == null)
      _initSapInterfaceRemoteProxy();
    return sapInterfaceRemote;
  }
  
  public java.lang.String executeXML(java.lang.String in0) throws java.rmi.RemoteException{
    if (sapInterfaceRemote == null)
      _initSapInterfaceRemoteProxy();
    return sapInterfaceRemote.executeXML(in0);
  }
  
  public java.lang.String getXmlScheme(java.lang.String in0) throws java.rmi.RemoteException{
    if (sapInterfaceRemote == null)
      _initSapInterfaceRemoteProxy();
    return sapInterfaceRemote.getXmlScheme(in0);
  }
  
  
}